            //添加
			function setCookie(name,value,day,path){
				value=encodeURIComponent(value);
				path=path || '/';
				if(day==undefined){
					var c=name+"="+value+";path="+path;
					c=decodeURIComponent(c)
					document.cookie=c
					
				}else{
					var now=new Date();
					now.setDate(now.getDate()+day);
					var c=name+"="+value+";path="+path+";expires="+now;
					c=decodeURIComponent(c);
					document.cookie=c
				}
				//console.log(document.cookie)
			}
			//setCookie('zhh',2018)
			
			
			
			//删除
			function removeCookie(name){
				setCookie(name,'',-365)
				
			}
			//removeCookie('nh')
			//console.log(document.cookie)
			
			
			//查询
			function getCookie(cookiename){
				var cookies=document.cookie;
				cookies=decodeURIComponent(cookies);
				//console.log(cookies)
				var arr=cookies.split('; ');
				
				for(var i=0;i<arr.length;i++){
					var str=arr[i];
					var t=str.split('=');
					//console.log(t)
					if(t[0]==cookiename){
						return t[1]
					}
				}
			}
			
			//var s=getCookie('nh');
		//	console.log(document.cookie)